package et.recipe;

import et.item.ETItems;
import ic2.core.Ic2Items;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;

import ic2.core.item.ItemIC2;
import thaumcraft.api.ThaumcraftApi;
import thaumcraft.api.aspects.Aspect;
import thaumcraft.api.aspects.AspectList;
import thaumcraft.api.crafting.CrucibleRecipe;
import thaumcraft.api.crafting.InfusionRecipe;
import thaumcraft.api.crafting.ShapedArcaneRecipe;
import thaumcraft.api.crafting.ShapelessArcaneRecipe;
import thaumcraft.common.config.ConfigBlocks;
import thaumcraft.common.config.ConfigItems;
import thaumcraft.common.config.ConfigResearch;

/**
 * Created by winston_wang on 2017/6/3.
 */
public class ETRecipes {
    @ETRecipe(recipeName = "ThuamPlate")
    public static final ShapelessArcaneRecipe thaumPlate = ThaumcraftApi.addShapelessArcaneCraftingRecipe("MAIN", new ItemStack(ETItems.thaumPlate), new AspectList().add(Aspect.TOOL, 10).add(Aspect.ORDER, 10), new Object[]{Ic2Items.ForgeHammer, new ItemStack(ConfigItems.itemResource,1,2)});
    @ETRecipe(recipeName = "ThuamCasing")
    public static final CrucibleRecipe thaumCasing = ThaumcraftApi.addCrucibleRecipe("CASING_THAUM", new ItemStack(ETItems.thaumCasing), new ItemStack(ETItems.thaumPlate),(new AspectList()).merge(Aspect.TOOL, 5).merge(Aspect.ORDER, 6));
    @ETRecipe(recipeName = "ThuamBattery")
    public static final ShapedArcaneRecipe thaumBattery =ThaumcraftApi.addArcaneCraftingRecipe("BATTERY_THAUM", new ItemStack(ETItems.thaumBattery), (new AspectList()).add(Aspect.ENERGY, 15).add(Aspect.MAGIC, 15).add(Aspect.METAL,10), new Object[]{" O ", "JPJ", "JPJ", Character.valueOf('O'), Ic2Items.insulatedTinCableItem, Character.valueOf('P'), new ItemStack(ConfigItems.itemResource,1,14), Character.valueOf('J'), ETItems.thaumCasing});
    @ETRecipe(recipeName = "VoidPlate")
    public static final CrucibleRecipe voidPlate = ThaumcraftApi.addCrucibleRecipe("PLATE_VOID", new ItemStack(ETItems.voidPlate), new ItemStack(ConfigItems.itemResource, 1, 16),(new AspectList()).merge(Aspect.TOOL, 10).merge(Aspect.ORDER, 7).merge(Aspect.VOID,3));
    @ETRecipe(recipeName = "VoidDrill")
    public static final InfusionRecipe voidDrill =  ThaumcraftApi.addInfusionCraftingRecipe("DRILL_VOID", new ItemStack(ETItems.voidDrill), 1, (new AspectList()).add(Aspect.MINE, 10).add(Aspect.VOID, 12).add(Aspect.TOOL, 5).add(Aspect.METAL,10), Ic2Items.miningDrill, new ItemStack[]{new ItemStack(ETItems.voidPlate), new ItemStack(ETItems.voidPlate), new ItemStack(ETItems.voidPlate), new ItemStack(ETItems.voidPlate)});
    @ETRecipe(recipeName = "BurnVoidDrill")
    public static final InfusionRecipe burnVoidDrill =  ThaumcraftApi.addInfusionCraftingRecipe("BURN_DRILL_VOID", new ItemStack(ETItems.burnVoidDrill), 2, (new AspectList()).add(Aspect.FIRE, 15).add(Aspect.MINE, 10).add(Aspect.ENERGY, 2), new ItemStack(ETItems.voidDrill), new ItemStack[]{new ItemStack(ETItems.thaumPlate), new ItemStack(ETItems.thaumPlate), new ItemStack(ETItems.thaumPlate), new ItemStack(Items.blaze_powder), new ItemStack(Items.fire_charge), new ItemStack(Items.blaze_powder), new ItemStack(Items.fire_charge)});
    @ETRecipe(recipeName = "LandVoidDrill")
    public static final InfusionRecipe landVoidDrill = ThaumcraftApi.addInfusionCraftingRecipe("LAND_DRILL_VOID", new ItemStack(ETItems.landVoidDrill, 1), 2, (new AspectList()).add(Aspect.EARTH, 15).add(Aspect.MINE, 10).add(Aspect.ENERGY, 2).add(Aspect.SLIME,5), new ItemStack(ETItems.voidDrill, 1), new ItemStack[]{new ItemStack(ETItems.thaumPlate), new ItemStack(ETItems.thaumPlate), new ItemStack(ETItems.thaumPlate), new ItemStack(Items.slime_ball), new ItemStack(Items.slime_ball), new ItemStack(Blocks.leaves), new ItemStack(Blocks.leaves)});
    @ETRecipe(recipeName = "windVoidDrill")
    public static final InfusionRecipe windVoidDrill = ThaumcraftApi.addInfusionCraftingRecipe("WIND_DRILL_VOID", new ItemStack(ETItems.windVoidDrill, 1), 2, (new AspectList()).add(Aspect.AIR, 15).add(Aspect.MINE, 10).add(Aspect.ENERGY, 2), new ItemStack(ETItems.voidDrill, 1), new ItemStack[]{new ItemStack(ETItems.thaumPlate), new ItemStack(ETItems.thaumPlate), new ItemStack(ETItems.thaumPlate), new ItemStack(Items.feather), new ItemStack(Blocks.sand), new ItemStack(Blocks.sand), new ItemStack(Items.feather)});
    @ETRecipe(recipeName = "waterVoidDrill")
    public static final InfusionRecipe waterVoidDrill = ThaumcraftApi.addInfusionCraftingRecipe("WATER_DRILL_VOID", new ItemStack(ETItems.waterVoidDrill, 1), 2, (new AspectList()).add(Aspect.WATER, 15).add(Aspect.MINE, 7).add(Aspect.ENERGY, 5), new ItemStack(ETItems.voidDrill, 1), new ItemStack[]{new ItemStack(ETItems.thaumPlate), new ItemStack(ETItems.thaumPlate), new ItemStack(ETItems.thaumPlate), new ItemStack(Blocks.ice), new ItemStack(Blocks.ice), new ItemStack(Items.fish), new ItemStack(Items.fish)});
    @ETRecipe(recipeName = "orderVoidDrill")
    public static final InfusionRecipe orderVoidDrill = ThaumcraftApi.addInfusionCraftingRecipe("ORDER_DRILL_VOID", new ItemStack(ETItems.orderVoidDrill, 1), 2, (new AspectList()).add(Aspect.ORDER, 15).add(Aspect.MINE, 7).add(Aspect.ENERGY, 12), new ItemStack(ETItems.voidDrill, 1), new ItemStack[]{new ItemStack(ETItems.thaumPlate), new ItemStack(ETItems.thaumPlate), new ItemStack(ETItems.thaumPlate), new ItemStack(Items.iron_ingot), new ItemStack(Items.quartz), new ItemStack(Items.quartz), new ItemStack(Items.iron_ingot)});
    @ETRecipe(recipeName = "chaosVoidDrill")
    public static final InfusionRecipe chaosVoidDrill = ThaumcraftApi.addInfusionCraftingRecipe("CHAOS_DRILL_VOID", new ItemStack(ETItems.chaosVoidDrill, 1), 2, (new AspectList()).add(Aspect.ENTROPY, 15).add(Aspect.MINE, 7).add(Aspect.ENERGY, 12), new ItemStack(ETItems.voidDrill, 1), new ItemStack[]{new ItemStack(ETItems.thaumPlate), new ItemStack(ETItems.thaumPlate), new ItemStack(ETItems.thaumPlate), Ic2Items.coil, Ic2Items.coil, new ItemStack(Items.redstone), new ItemStack(Blocks.redstone_block)});
    @ETRecipe(recipeName = "voidSaber")
    public static final InfusionRecipe voidSaber = ThaumcraftApi.addInfusionCraftingRecipe("VOID_SABER", new ItemStack(ETItems.voidSaber, 1), 3, (new AspectList()).add(Aspect.VOID, 15).add(Aspect.WEAPON, 10).add(Aspect.DARKNESS, 10).add(Aspect.ENERGY,6), Ic2Items.nanoSaber, new ItemStack[]{new ItemStack(ETItems.thaumPlate), Ic2Items.energyCrystal, new ItemStack(ETItems.voidPlate), new ItemStack(ConfigItems.itemResource, 1, 16), new ItemStack(ConfigItems.itemSwordVoid), new ItemStack(ConfigItems.itemSwordVoid), new ItemStack(ConfigItems.itemSwordVoid)});
    @ETRecipe(recipeName = "chargeFocus")
    public static final InfusionRecipe chargeFocus = ThaumcraftApi.addInfusionCraftingRecipe("FOCUS_CHARGE", new ItemStack(ETItems.focusCharge), 3, (new AspectList()).add(Aspect.ENERGY, 20).add(Aspect.TOOL, 15).add(Aspect.ORDER, 10).add(Aspect.MAGIC,6), new ItemStack(Ic2Items.machine.getItem(),1,0), new ItemStack[]{new ItemStack(ETItems.voidPlate), Ic2Items.energyCrystal, new ItemStack(ETItems.voidPlate), Ic2Items.coil, Ic2Items.coil, Ic2Items.coil, Ic2Items.coil});
    @ETRecipe(recipeName = "teslaFocus")
    public static final InfusionRecipe teslaFocus = ThaumcraftApi.addInfusionCraftingRecipe("FOCUS_TESLA", new ItemStack(ETItems.focusTesla), 3, (new AspectList()).add(Aspect.ENERGY, 20).add(Aspect.WEAPON, 19).add(Aspect.ORDER, 10).add(Aspect.METAL,10).add(Aspect.MAGIC,6), new ItemStack(ETItems.focusCharge), new ItemStack[]{Ic2Items.teslaCoil, Ic2Items.teslaCoil, Ic2Items.teslaCoil, Ic2Items.advancedCircuit, new ItemStack(ETItems.voidPlate), new ItemStack(ETItems.voidPlate), new ItemStack(ETItems.voidPlate), new ItemStack(ETItems.voidPlate)});
    @ETRecipe(recipeName = "cmFocus")
    public static final InfusionRecipe cmFocus = ThaumcraftApi.addInfusionCraftingRecipe("FOCUS_CM", new ItemStack(ETItems.focusChargeMagic), 3, (new AspectList()).add(Aspect.ENERGY, 20).add(Aspect.TOOL, 19).add(Aspect.ORDER, 10).add(Aspect.MAGIC,6), new ItemStack(Ic2Items.machine.getItem(),1,0), new ItemStack[]{new ItemStack(ConfigBlocks.blockTube,1,0), new ItemStack(ConfigBlocks.blockTube,1,0), new ItemStack(ConfigBlocks.blockTube,1,0), new ItemStack(ConfigBlocks.blockTube,1,0), new ItemStack(ConfigBlocks.blockStoneDevice), Ic2Items.electronicCircuit, new ItemStack(ETItems.voidPlate), new ItemStack(ETItems.voidPlate), new ItemStack(ETItems.voidPlate), new ItemStack(ETItems.voidPlate)});
    @ETRecipe(recipeName = "solarRing")
    public static final InfusionRecipe soalrRing = ThaumcraftApi.addInfusionCraftingRecipe("SOLAR_RING", new ItemStack(ETItems.solarRing), 3, (new AspectList()).add(Aspect.ENERGY, 20).add(Aspect.TOOL, 19).add(Aspect.LIGHT, 20), new ItemStack(ConfigItems.itemBaubleBlanks,1,1), new ItemStack[]{new ItemStack(ETItems.voidPlate), new ItemStack(ETItems.voidPlate), Ic2Items.solarPanel, new ItemStack(ETItems.voidPlate), new ItemStack(ETItems.voidPlate), Ic2Items.goldCableItem, new ItemStack(Items.redstone), Ic2Items.goldCableItem, new ItemStack(Items.redstone)});
    @ETRecipe(recipeName = "voidFibre")
    public static final ShapelessArcaneRecipe voidFibre = ThaumcraftApi.addShapelessArcaneCraftingRecipe("VOID_FiBIE", new ItemStack(ETItems.voidFibre), new AspectList().add(Aspect.TOOL, 20).add(Aspect.VOID, 20).add(Aspect.METAL,20), new Object[]{Ic2Items.carbonPlate, new ItemStack(ETItems.voidPlate), new ItemStack(ETItems.voidPlate), new ItemStack(ETItems.voidPlate), new ItemStack(ETItems.voidPlate)});

    public static void initOtherRecipe(){
        for (int i = 1; i < 27; i++) {
            ConfigResearch.recipes.put("VoidDrill_" + i, ThaumcraftApi.addInfusionCraftingRecipe("DRILL_VOID", new ItemStack(ETItems.voidDrill, 1, i), 1, (new AspectList()).add(Aspect.MINE, 10).add(Aspect.VOID, 12).add(Aspect.TOOL, 5).add(Aspect.METAL, 10), new ItemStack(Ic2Items.miningDrill.getItem(), 1, i), new ItemStack[]{new ItemStack(ETItems.voidPlate), new ItemStack(ETItems.voidPlate), new ItemStack(ETItems.voidPlate), new ItemStack(ETItems.voidPlate)}));
        }
        for (int i = 1; i < 27; i++) {
            ConfigResearch.recipes.put("BurnVoidDrill_" + i, ThaumcraftApi.addInfusionCraftingRecipe("BURN_DRILL_VOID", new ItemStack(ETItems.burnVoidDrill, 1, i), 2, (new AspectList()).add(Aspect.FIRE, 15).add(Aspect.MINE, 10).add(Aspect.ENERGY, 2), new ItemStack(ETItems.voidDrill, 1, i), new ItemStack[]{new ItemStack(ETItems.thaumPlate), new ItemStack(ETItems.thaumPlate), new ItemStack(ETItems.thaumPlate), new ItemStack(Items.blaze_powder), new ItemStack(Items.fire_charge), new ItemStack(Items.blaze_powder), new ItemStack(Items.fire_charge)}));
        }
        for (int i = 1; i < 27; i++) {
            ConfigResearch.recipes.put("LandVoidDrill_" + i, ThaumcraftApi.addInfusionCraftingRecipe("LAND_DRILL_VOID", new ItemStack(ETItems.landVoidDrill, 1, i), 2, (new AspectList()).add(Aspect.EARTH, 15).add(Aspect.MINE, 10).add(Aspect.ENERGY, 2).add(Aspect.SLIME,5), new ItemStack(ETItems.voidDrill, 1, i), new ItemStack[]{new ItemStack(ETItems.thaumPlate), new ItemStack(ETItems.thaumPlate), new ItemStack(ETItems.thaumPlate), new ItemStack(Items.slime_ball), new ItemStack(Items.slime_ball), new ItemStack(Blocks.leaves), new ItemStack(Blocks.leaves)}));
        }
        for (int i = 1; i < 27; i++) {
            ConfigResearch.recipes.put("windVoidDrill_" + i, ThaumcraftApi.addInfusionCraftingRecipe("WIND_DRILL_VOID", new ItemStack(ETItems.windVoidDrill, 1, i), 2, (new AspectList()).add(Aspect.AIR, 15).add(Aspect.MINE, 10).add(Aspect.ENERGY, 2), new ItemStack(ETItems.voidDrill, 1, i), new ItemStack[]{new ItemStack(ETItems.thaumPlate), new ItemStack(ETItems.thaumPlate), new ItemStack(ETItems.thaumPlate), new ItemStack(Items.feather), new ItemStack(Blocks.sand), new ItemStack(Blocks.sand), new ItemStack(Items.feather)}));
        }
        for (int i = 1; i < 27; i++) {
            ConfigResearch.recipes.put("waterVoidDrill_" + i, ThaumcraftApi.addInfusionCraftingRecipe("WATER_DRILL_VOID", new ItemStack(ETItems.waterVoidDrill, 1, i), 2, (new AspectList()).add(Aspect.WATER, 15).add(Aspect.MINE, 7).add(Aspect.ENERGY, 5), new ItemStack(ETItems.voidDrill, 1, i), new ItemStack[]{new ItemStack(ETItems.thaumPlate), new ItemStack(ETItems.thaumPlate), new ItemStack(ETItems.thaumPlate), new ItemStack(Blocks.ice), new ItemStack(Blocks.ice), new ItemStack(Items.fish), new ItemStack(Items.fish)}));
        }
        for (int i = 1; i < 27; i++) {
            ConfigResearch.recipes.put("orderVoidDrill_" + i, ThaumcraftApi.addInfusionCraftingRecipe("ORDER_DRILL_VOID", new ItemStack(ETItems.orderVoidDrill, 1, i), 2, (new AspectList()).add(Aspect.ORDER, 15).add(Aspect.MINE, 7).add(Aspect.ENERGY, 12), new ItemStack(ETItems.voidDrill, 1, i), new ItemStack[]{new ItemStack(ETItems.thaumPlate), new ItemStack(ETItems.thaumPlate), new ItemStack(ETItems.thaumPlate), new ItemStack(Items.iron_ingot), new ItemStack(Items.quartz), new ItemStack(Items.quartz), new ItemStack(Items.iron_ingot)}));
        }
        for (int i = 1; i < 27; i++) {
            ConfigResearch.recipes.put("voidSaber_" + i, ThaumcraftApi.addInfusionCraftingRecipe("VOID_SABER", new ItemStack(ETItems.voidSaber, 1,i), 3, (new AspectList()).add(Aspect.VOID, 15).add(Aspect.WEAPON, 10).add(Aspect.DARKNESS, 10).add(Aspect.ENERGY,6), new ItemStack(Ic2Items.nanoSaber.getItem(),1,i), new ItemStack[]{new ItemStack(ETItems.thaumPlate), new ItemStack(Ic2Items.energyCrystal.getItem(),1,i), new ItemStack(ETItems.voidPlate), new ItemStack(ConfigItems.itemResource, 1, 16), new ItemStack(ConfigItems.itemSwordVoid), new ItemStack(ConfigItems.itemSwordVoid), new ItemStack(ConfigItems.itemSwordVoid)}));
        }
        for (int i = 1; i < 27; i++) {
            ConfigResearch.recipes.put("chaos_VoidDrill" + i, ThaumcraftApi.addInfusionCraftingRecipe("CHAOS_DRILL_VOID", new ItemStack(ETItems.chaosVoidDrill, 1,i), 2, (new AspectList()).add(Aspect.ENTROPY, 15).add(Aspect.MINE, 7).add(Aspect.ENERGY, 12), new ItemStack(ETItems.voidDrill, 1,i), new ItemStack[]{new ItemStack(ETItems.thaumPlate), new ItemStack(ETItems.thaumPlate), new ItemStack(ETItems.thaumPlate), Ic2Items.coil, Ic2Items.coil, new ItemStack(Items.redstone), new ItemStack(Blocks.redstone_block)}));
        }
    }
}
